package greaderbook.frontend;

import greaderbook.frontend.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

/**
 * Activity for Google Reader API authentication.
 * @author Jia Cherng Ho
 *
 */
public class AuthenticationView extends Activity {
	private Button submit;
	private EditText userInput;
	private EditText passInput;
	private TextView resultLbl;
	
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.auth);
		
		userInput = (EditText) findViewById(R.id.user_txt);
		passInput = (EditText) findViewById(R.id.pass_txt);
		resultLbl = (TextView) findViewById(R.id.result_lbl);
		submit = (Button) findViewById(R.id.auth_submit);
		submit.setOnClickListener(new AuthSubmitListener(this, userInput, passInput, resultLbl));
	}
}
